package org.jeecg.common.fs;

import org.jeecg.common.fs.impl.LocalFileServiceImpl;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;

public class FileConfig {

    @Bean
    @ConditionalOnProperty(prefix = "jeecg.fs.local", name = "localPath")
    public LocalFileServiceImpl localFileServiceImpl(@Value("${jeecg.fs.local.localPath}")String localPath){
        return new LocalFileServiceImpl(localPath);
    }
}
